<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">
   
       <div class="tab-pane fade in active" id="course">
           <div class="hero-unit"> 
              <h2>Cursos actuales</h2>
              <h:form>
                  <h:commandLink class="btn  btn-info" action="createCourse" value="Crear Curso"/>
              </h:form>
              <h3>Filtrar:</h3>
                   <!--Tabla de Profesores-->
                   <h:dataTable class="table table-bordered table-striped" style="background-color: white;" value="#{coursesMB.coursesByProfessor}" binding="#{coursesMB.table}" var="course">
                       <h:column>
                            <f:facet name="header">
                                <h:outputText value="ID"/>
                            </f:facet>
                           <h:outputText value="#{course.id}"/>
                        </h:column>
                       <h:column>
                            <f:facet name="header">
                                <h:outputText value="Curso"/>
                            </f:facet>
                            <h:outputText value="#{course.name}"/>
                        </h:column>
                        <h:column>
                               <f:facet name="header">
                                    <h:outputText value="Categoría"/>
                               </f:facet>
                            <h:outputText value="#{course.category}"/>
                        </h:column>
                        <h:column>
                               <f:facet name="header">
                                  <h:outputText value="Más"/>
                               </f:facet>
                           
                            <h:form>
                                 <img src="../img/icons/icon-delete.jpg"/>
                                 <h:commandLink action="#{coursesMB.editFormList()}"> <h:graphicImage url="../img/icons/icon_edit.gif"/> </h:commandLink>
                                 <img src="../img/icons/icon-details.gif"/>
                            </h:form>
                             
                        </h:column>
                   </h:dataTable>  
            </div> 
       </div>
</html>